home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test_symtable.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  908b  |  22 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. from test.test_support import vereq, TestFailed
  5. import _symtable
  6. symbols = _symtable.symtable('def f(x): return x', '?', 'exec')
  7. vereq(symbols[0].name, 'global')
  8. []([](_[1]), 1)
  9.  
  10. def checkfilename(brokencode):
  11.     
  12.     try:
  13.         _symtable.symtable(brokencode, 'spam', 'exec')
  14.     except SyntaxError:
  15.         e = None
  16.         vereq(e.filename, 'spam')
  17.  
  18.     raise TestFailed('no SyntaxError for %r' % (brokencode,))
  19.  
  20. checkfilename('def f(x): foo)(')
  21. checkfilename('def f(x): global x')
  22.